class NotHandledError(Exception):
    pass

class Dispatcher(object):
    def dispatch(self, action, *args, **kwargs):
        handler_name = '_handle_' + action
        method = getattr(self, handler_name, None)
        if method:
            return method(*args, **kwargs)
        raise NotHandledError('unknown operation')
